clear all

** Set working directory: please set your own
/*
cd "~/Dropbox/sanctions_replication/"
*/
** Open dataset
use data/within_effects_sanctions.dta, clear

* Run the analyses
regr sanction nothing_dummy gossip_dummy deny_dummy avoid_dummy insult_dummy verbal_dummy i.id, cluster(id)
estimates store sanctions

regr exp_sanction nothing_dummy gossip_dummy deny_dummy avoid_dummy insult_dummy verbal_dummy i.id, cluster(id)
estimates store exp_sanctions

* Make table
esttab sanctions exp_sanctions using tables/tableb6.tex, ///
mtitles("Acceptability of each sanction (own)" "Acceptability of each sanction (others)"  ) ///
keep(nothing_dummy gossip_dummy deny_dummy avoid_dummy insult_dummy verbal_dummy _cons) ///
coeflabels(nothing_dummy "Do nothing" gossip_dummy "Gossip" deny_dummy "Deny help" ///
avoid_dummy "Avoid interaction" insult_dummy "Insult" verbal_dummy "Verbal" _cons "Constant") ///
se replace star(* 0.10 ** 0.05 *** 0.01) ///
addnotes("The reference category is the acceptability of physical sanctions" "Standard errors are clustered by respondent" "All models include respondent-level fixed effects")
